package com.example.designpatterns.chain;

/**
 * 具体处理类T3
 * 处理15天以下假期，包含15天
 */
public class LeaderT3 extends Leader{
    public LeaderT3(String name){
        super(name);
    }
    @Override
    public void handleRequest(LeaveNode leaveNode){
        if(leaveNode.getNumber() <=15){
            System.out.println("T3:"+name+",审批:" +leaveNode.getPerson()+"假条，天数："+ leaveNode.getNumber());
        }else {
            if(this.successor != null){
                this.successor.handleRequest(leaveNode);
            }
            System.out.println("请假超过15天，不给假");
        }
    }
}
